package com.shrct.businessprocess.organization.impl;

import com.shrct.businessprocess.organization.RCGroupCustomerCode;
import com.shrct.businessprocess.organization.proxy.RCGroupCustomerCodeProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("RCGROUPCUSTOMERCODE_TYPE")
public class RCGroupCustomerCodeImpl extends CodeImpl implements RCGroupCustomerCode {
  public RCGroupCustomerCodeImpl() {
    super();
  }
  
  public static RCGroupCustomerCode create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.organization.RCGroupCustomerCode rCGroupCustomerCode = new com.shrct.businessprocess.organization.impl.RCGroupCustomerCodeImpl(
    );
    objectFactory.create(rCGroupCustomerCode);
    return rCGroupCustomerCode;			
    
  }
  
  public static RCGroupCustomerCode createRCGroupCustomerCodeImpl(final IObjectFactory objectFactory, final Procedure1<RCGroupCustomerCode> init) {
    com.shrct.businessprocess.organization.RCGroupCustomerCode rCGroupCustomerCode = new com.shrct.businessprocess.organization.impl.RCGroupCustomerCodeImpl(
    );
    objectFactory.create(rCGroupCustomerCode);
    init.apply(rCGroupCustomerCode);
    
    return rCGroupCustomerCode;			
    
  }
  
  public RCGroupCustomerCodeProxy toProxy() {
    com.shrct.businessprocess.organization.proxy.RCGroupCustomerCodeProxy proxy = new com.shrct.businessprocess.organization.proxy.RCGroupCustomerCodeProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
